package com.iplant.wms.controller.hr;

import com.iplant.base.po.Pagination;
import com.iplant.base.po.ServiceResult;
import com.iplant.base.utils.RetCode;
import com.iplant.base.utils.annotation.trace.TraceAPI;
import com.iplant.base.utils.general.StringUtils;
import com.iplant.basic.controller.BasicController;
import com.iplant.basic.service.po.bms.BMSEmployee;
import com.iplant.wms.service.WMSService;
import com.iplant.wms.service.po.hr.WMSStockAlarmHR;
import com.iplant.wms.service.po.mfs.WMSStoreArea;
import com.iplant.wms.service.po.mrp.MRPDelivery;
import com.iplant.wms.serviceImpl.utils.WMSAlarmUtils;
import lombok.extern.slf4j.Slf4j;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import java.util.Calendar;
import java.util.List;

@Slf4j
@RestController
@RequestMapping("/api/WMSStockAlarmHR")
public class WMSStockAlarmHRController extends BasicController<WMSStockAlarmHR> {
    private static Logger logger = LoggerFactory.getLogger(WMSStockAlarmHRController.class);


    public WMSStockAlarmHRController() {
        super(WMSStockAlarmHR.class);
    }


    @TraceAPI("查询完整物料配送需求")
    @GetMapping("/CheckAlarm")
    public Object CheckAlarm(HttpServletRequest request) {
        Object wResult;
        try {
            BMSEmployee wLoginUser = GetSession(request);

            WMSAlarmUtils.getInstance().WMS_StockAlarmCheckHR(wLoginUser);

            wResult = GetResult(RetCode.SERVER_CODE_SUC, "");

        } catch (Exception ex) {
            log.error(ex.toString());
            wResult = GetResult(RetCode.SERVER_CODE_ERR, ex.toString());
        }
        return wResult;
    }


}
